import Mock from 'mockjs'

Mock.mock('http://api.apiopen.top/login', 'post', () => {
    let userInfo = {
        name: 'admin',
        userId: 134
    }
    return userInfo;
})

Mock.mock('http://api.apiopen.top/logout', 'post', () => {
    let userInfo = {
        name: 'admin',
        userId: 134
    }
    return userInfo;
})

Mock.mock('http://10.0.54.7/mock/getList', 'post', () => {
    let list = [{
        id: 121,
        state: 1,
        title: '标题名1',
        date: '2019-01-15'
    },{
        id: 122,
        state: 0,
        title: '标题名2',
        date: '2019-01-15'
    },{
        id: 123,
        state: 0,
        title: '标题名3',
        date: '2019-01-15'
    },{
        id: 124,
        state: 1,
        title: '标题名4',
        date: '2019-01-15'
    },{
        id: 125,
        state: 0,
        title: '标题名5',
        date: '2019-01-15'
    }]
    return {
        success: true,
        total:50,
        rows: list
    };
})

export default Mock